package com.hedgehoglab.fixxclipse.treeviewer.model;

import java.util.ArrayList;
import java.util.List;

public class Project extends Model{
	
	private String name;
	private Fixx parent;
	private List<Version> versions;


	public Project(String string, Fixx root) {
		this.setName(string);
		this.setParent(root);
		List<Version> v = new ArrayList<Version>();
		v.add(new Version("Version 1"));
		v.add(new Version("Version 2"));
		this.setVersions(v);
	}

	public Project() {
		// TODO Auto-generated constructor stub
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}

	public void setParent(Fixx parent) {
		this.parent = parent;
	}

	public Fixx getParent() {
		return parent;
	}

	@Override
	public String toString() {
		String str = "Project [name=" + name;
		for(Version v: versions){
			str += "[version=" + v + "]";
		}
		str += "]";
		
		return str;
	}

	public void setVersions(List<Version> versions) {
		this.versions = versions;
	}

	public List<Version> getVersions() {
		return versions;
	}

	
	
	
	
}
